package com.hangzhou.xyj.ui.fragment;

import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;

import com.hangzhou.xyj.R;
import com.hangzhou.xyj.manager.IntentManager;
import com.hangzhou.xyj.model.type.EIntentTagType;
import com.hangzhou.xyj.ui.activity.DramaCategoryListActivity;
import com.hangzhou.xyj.ui.fragment.base.BaseFragment;
import com.hangzhou.xyj.utils.constants.DataKey;

/**
 * 发现
 *
 * @author neo.duan
 */
public class FindFragment extends BaseFragment implements OnClickListener {

    public FindFragment() {

    }

    @Override
    public void initTop() {
        enableTop(false);
        enableRefresh(false);
    }

    @Override
    public void initLayouts() {
        setContentView(R.layout.fragment_find);
    }

    @Override
    public void initViews() {
    }

    @Override
    public void initDatas() {
    }

    @Override
    public void initListeners() {
        findView(R.id.view_find_group).setOnClickListener(this);
        findView(R.id.view_find_drama_group).setOnClickListener(this);//剧团
        findView(R.id.civ_action).setOnClickListener(this);
        findView(R.id.civ_show).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.view_find_group:
                IntentManager.getInstance().goGroupActivity(mContext);
                break;
            case R.id.view_find_drama_group://剧团
                Intent intent = new Intent(mContext, DramaCategoryListActivity.class);
                intent.putExtra(DataKey.INTENT_TAG, EIntentTagType.TAG_DRAMA_GROUP.getValue());
                intent.putExtra(DataKey.TITLE, "剧团");
                IntentManager.getInstance().goActivity(mContext, intent);
                break;
            case R.id.civ_action:
                IntentManager.getInstance().goFindActionActivity(mContext);
                break;
            case R.id.civ_show:
                IntentManager.getInstance().goShowActivity(mContext);
                break;
        }
    }
}
